﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aribaccio;
using Aribaccio.Device;
using BDPAutodetect.Device;
using BDPAutodetect.Models;

namespace BDPAutodetect.Mgrcore
{
    /// <summary>
    /// 电压电流采样板 检测设备
    /// </summary>
    public class DetectDeviceElectrical : DetectDeviceModbus
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="argDevice">设备连接对象</param>
        /// <param name="argTargetSlaves">设备指标协议数据集</param>
        public DetectDeviceElectrical(DeviceSerialModbus<IDevicePara> argDevice, List<MTargetSlave> argTargetSlaves)
            : base($"电压电流采样板检测设备通讯", DeviceType.Electrical, DeviceStationType.None, argDevice, argTargetSlaves)
        {

        }

        /// <summary>
        /// 读取设备数据
        /// </summary>
        /// <returns></returns>
        public ResultModel<decimal> ReadDeviceDataDecimal(DeviceStationType argStationType, DeviceTargetType argDeviceTarget)
        {
            return ReadDeviceDataDecimal<StructInputShort>(argStationType, argDeviceTarget, new StructInputShort(0x01));
        }
    }
}
